import ttnavbar from './../components/ttnavbar.vue'
import xinwen from './../components/xinwen.vue'
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.extend(relativeTime)
dayjs.locale('zh-cn')
var plugin = {}
plugin.install = function (Vue) {
  Vue.component('ttnavbar', ttnavbar)
  Vue.component('xinwen', xinwen)
  Vue.filter('mydayjstime', function (value) {
    return dayjs().from(value)
  })
}
// 将对象暴露出去
export default plugin
